import { Component, _decorator } from "cc";
import GameCtrl from "../../model/GameCtrl";
import ModelGame from "../../model/ModelGame";
import PoolUtils from "../../utils/PoolUtils";
const { ccclass, property } = _decorator;

@ccclass("GamgOver")
export default class GamgOver extends Component {
  onBtnNewGame() {
    this.node.removeFromParent();
    this.node.destroy();
    ModelGame.ins.pokers.forEach((item) => {
      let node = item.getView.node;
      PoolUtils.ins.uiPoker.put(node);
    });
    GameCtrl.ins.newGame();
  }
}
